package com.softer.wxzj.mapper;

import com.softer.wxzj.entity.FlowAuditdetail;
import com.softer.wxzj.mapper.base.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * RoleMapper class
 * @author zcz
 * @date 2019/1/16
 */
@Repository
public interface FlowAuditdetailMapper extends BaseMapper<FlowAuditdetail> {
    /**
     * 根据业务id和类型查询审批意见
     * @param businessId
     * @param flowType
     * @return
     */
    List<FlowAuditdetail> getAuditdetailList(@Param("businessId") String businessId,@Param("flowType") String flowType);
    /**
     * 根据实例id查询审批意见
     * @param instanceId
     * @return
     */
    List<FlowAuditdetail> getListByInstanceId(String instanceId);
    /**
     * 根据业务id和类型查询当前的审批意见
     * @param businessId
     * @param flowType
     * @return
     */
    List<FlowAuditdetail> getCurrentAuditdetailList(@Param("businessId") String businessId, @Param("flowType") String flowType);

    /**
     * 查询企业最后一次审核不通过的意见
     *
     * @param businessId 业务ID
     * @param flowType   业务类型
     * @return 意见
     */
    String getOpinion(@Param("businessId") String businessId, @Param("flowType") String flowType);

}
